/* 五子棋在线对战游戏 - 公共样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
}

/* 主色调 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #e67e22;
    --danger-color: #e74c3c;
    --background-color: #f8f9fa;
    --white: #ffffff;
    --text-color: #2c3e50;
    --border-color: #ddd;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #2980b9;
    color: white;
}

.btn-primary:hover {
    background-color: #1f5f8b;
}

.btn-success {
    background-color: #2ecc71;
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-warning {
    background-color: #e67e22;
    color: white;
}

.btn-warning:hover {
    background-color: #d35400;
}

/* 输入框样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* 卡片样式 */
.card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin: 20px 0;
}

/* 面板样式 */
.panel {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 10px 0;
}

/* 头部样式 */
.header {
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 18px;
    font-weight: bold;
}

/* 链接样式 */
.link {
    color: var(--secondary-color);
    text-decoration: none;
    cursor: pointer;
}

.link:hover {
    text-decoration: underline;
}

/* 状态提示 */
.status-success {
    color: var(--success-color);
    background: #d5f4e6;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 10px 0;
}

.status-error {
    color: var(--danger-color);
    background: #fadbd8;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 10px 0;
}

.status-warning {
    color: var(--warning-color);
    background: #fef9e7;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 10px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .card, .panel {
        padding: 16px;
        margin: 10px 0;
    }
    
    .header {
        padding: 12px 16px;
    }
    
    .header h1 {
        font-size: 16px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 显示类 */
.visible {
    display: block !important;
}
